using System.Collections.Generic;
using Magiq.Sql.Tests.TestModel;

namespace Magiq.Sql.Tests {
    public class CollectionTestDomain {
        public CollectionTestDomain() {
            ChildItems = new List<ChildItem>();
            Parents = new List<Parent>();
            for (var i = 0; i < 30; i++) {
                ChildItems.Add(new ChildItem
                                   {
                                       Name = i%3 == 0 ? "lala" : "lala" + i
                                   });
            }
            for (var i = 0; i < 10; i++) {
                Parents.Add(new Parent
                                {
                                    Name = "test" + i
                                });
            }

            for (var i = 0; i < 10; i++) {
                Parents[0].AddItem(ChildItems[i]);
                Parents[1].AddItem(ChildItems[i + 10]);
                Parents[2].AddItem(ChildItems[i + 20]);
            }
        }

        public List<ChildItem> ChildItems { get; private set; }
        public List<Parent> Parents { get; private set; }
    }
}